package cn.iocoder.yudao.module.reading.controller.app.audio.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Min;

/**
 * 音频播放记录 Request VO
 *
 * @author 芋道源码
 */
@Schema(description = "用户 APP - 音频播放记录 Request VO")
@Data
public class AudioPlayReqVO {

    @Schema(description = "音频资源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "音频资源ID不能为空")
    private Long audioId;

    @Schema(description = "播放进度（秒）", requiredMode = Schema.RequiredMode.REQUIRED, example = "60")
    @NotNull(message = "播放进度不能为空")
    @Min(value = 0, message = "播放进度不能为负数")
    private Integer playProgress;

    @Schema(description = "播放时长（秒）", requiredMode = Schema.RequiredMode.REQUIRED, example = "30")
    @NotNull(message = "播放时长不能为空")
    @Min(value = 0, message = "播放时长不能为负数")
    private Integer playDuration;

    @Schema(description = "是否播放完成", requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
    @NotNull(message = "是否播放完成不能为空")
    private Boolean isCompleted;

}
